package fei.zhou.springboot4.business.config.servlet;

import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 描述该类- JPA
 *
 * @author zhoufei
 * @class: Config
 * @date 2021/1/20 10:26
 * @Verson 1.0 -2021/1/20 10:26
 * @see
 */
@Configuration
public class Config {
    // 注册Servlet
    @Bean
    public ServletRegistrationBean myServlet() {
        ServletRegistrationBean registrationBean = new ServletRegistrationBean(
                new MyServlet(), "/todoMyServlet");
        registrationBean.setLoadOnStartup(1);
        return registrationBean;
    }
    
}